#include "JetPwr.h"
/*****************************
*函数名称： JETPWR_Configuration
*函数功能： 初始化电源控制的IO
*输入功能： none
*输出功能： none
******************************/
void JETPWR_Configuration(void)
{
	//定义变量
	GPIO_InitTypeDef GPIO_InitStructure;
	//RCC设置
	switch((uint32_t)JET_PWR_PORT)
	{
		case (uint32_t)GPIOA: RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA,ENABLE);break;
		case (uint32_t)GPIOB: RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOB,ENABLE);break;
		case (uint32_t)GPIOC: RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOC,ENABLE);break;
		case (uint32_t)GPIOD: RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOD,ENABLE);break;
		case (uint32_t)GPIOE: RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOE,ENABLE);break;
		case (uint32_t)GPIOF: RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOF,ENABLE);break;
	}

    //设置电源管控脚
	GPIO_InitStructure.GPIO_Pin	=	JET_PWR_PIN;
	GPIO_InitStructure.GPIO_Mode 	= 	GPIO_Mode_Out_PP ;                  //推挽输出
	GPIO_InitStructure.GPIO_Speed 	= 	GPIO_Speed_50MHz;
	GPIO_Init(JET_PWR_PORT, &GPIO_InitStructure);
	GPIO_ResetBits(JET_PWR_PORT,JET_PWR_PIN); 			            //默认输出低电平 
}

